package com.itheima.charstream;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Arrays;

public class Demo03 {

    public static void main(String[] args) throws IOException {
        //输入流
        FileReader reader = new FileReader("day13\\abc.txt");
        //读
        //int read = reader.read();
        //  System.out.println((char)read);
        char[] chs=new char[1024];
        int len;
        /* = reader.read(chs);
        System.out.println("读了"+len+"个数据");
        System.out.println(Arrays.toString(chs));*/
        while ((len=reader.read(chs))!=-1){
            String s = new String(chs, 0, len);
            System.out.println(s);

        }
        //关流
        reader.close();


    }
}
